{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 聚类"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "#导入必要的工具包\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from sklearn.cluster import MiniBatchKMeans\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn import metrics\n",
    "\n",
    "from sklearn.decomposition import PCA\n",
    "import time\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>event_id</th>\n",
       "      <th>user_id</th>\n",
       "      <th>start_time</th>\n",
       "      <th>city</th>\n",
       "      <th>state</th>\n",
       "      <th>zip</th>\n",
       "      <th>country</th>\n",
       "      <th>lat</th>\n",
       "      <th>lng</th>\n",
       "      <th>...</th>\n",
       "      <th>c_92</th>\n",
       "      <th>c_93</th>\n",
       "      <th>c_94</th>\n",
       "      <th>c_95</th>\n",
       "      <th>c_96</th>\n",
       "      <th>c_97</th>\n",
       "      <th>c_98</th>\n",
       "      <th>c_99</th>\n",
       "      <th>c_100</th>\n",
       "      <th>c_other</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>1379185675</td>\n",
       "      <td>947978913</td>\n",
       "      <td>2012-09-13T02:00:00.003Z</td>\n",
       "      <td>Toronto</td>\n",
       "      <td>ON</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Canada</td>\n",
       "      <td>43.648</td>\n",
       "      <td>-79.375</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>3189486214</td>\n",
       "      <td>1176436376</td>\n",
       "      <td>2012-10-28T20:00:00.003Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>4090120152</td>\n",
       "      <td>3416671649</td>\n",
       "      <td>2012-10-13T05:00:00.003Z</td>\n",
       "      <td>Long Beach</td>\n",
       "      <td>CA</td>\n",
       "      <td>NaN</td>\n",
       "      <td>United States</td>\n",
       "      <td>33.756</td>\n",
       "      <td>-118.108</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>899668139</td>\n",
       "      <td>1558385303</td>\n",
       "      <td>2012-11-18T04:00:00.003Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>1077498346</td>\n",
       "      <td>3631515235</td>\n",
       "      <td>2012-11-12T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 111 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   Unnamed: 0    event_id     user_id                start_time        city  \\\n",
       "0           0  1379185675   947978913  2012-09-13T02:00:00.003Z     Toronto   \n",
       "1           1  3189486214  1176436376  2012-10-28T20:00:00.003Z         NaN   \n",
       "2           2  4090120152  3416671649  2012-10-13T05:00:00.003Z  Long Beach   \n",
       "3           3   899668139  1558385303  2012-11-18T04:00:00.003Z         NaN   \n",
       "4           4  1077498346  3631515235  2012-11-12T00:00:00.001Z         NaN   \n",
       "\n",
       "  state  zip        country     lat      lng   ...     c_92  c_93  c_94  c_95  \\\n",
       "0    ON  NaN         Canada  43.648  -79.375   ...        0     0     0     0   \n",
       "1   NaN  NaN            NaN     NaN      NaN   ...        0     0     0     0   \n",
       "2    CA  NaN  United States  33.756 -118.108   ...        0     0     0     0   \n",
       "3   NaN  NaN            NaN     NaN      NaN   ...        0     0     0     0   \n",
       "4   NaN  NaN            NaN     NaN      NaN   ...        0     0     0     0   \n",
       "\n",
       "   c_96  c_97  c_98  c_99  c_100  c_other  \n",
       "0     0     1     0     0      0       30  \n",
       "1     0     0     0     0      0       14  \n",
       "2     0     0     0     0      2       17  \n",
       "3     0     0     0     0      0        8  \n",
       "4     0     0     0     0      0        8  \n",
       "\n",
       "[5 rows x 111 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = pd.read_csv('events2.csv')\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "前面对数据进行筛选的时候可能没有对索引做处理，导致多了一行，不过不影响，在这里删除就是。另外，题目要求从count1开始（即去掉前9列），这里一并处理。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>c_1</th>\n",
       "      <th>c_2</th>\n",
       "      <th>c_3</th>\n",
       "      <th>c_4</th>\n",
       "      <th>c_5</th>\n",
       "      <th>c_6</th>\n",
       "      <th>c_7</th>\n",
       "      <th>c_8</th>\n",
       "      <th>c_9</th>\n",
       "      <th>c_10</th>\n",
       "      <th>...</th>\n",
       "      <th>c_92</th>\n",
       "      <th>c_93</th>\n",
       "      <th>c_94</th>\n",
       "      <th>c_95</th>\n",
       "      <th>c_96</th>\n",
       "      <th>c_97</th>\n",
       "      <th>c_98</th>\n",
       "      <th>c_99</th>\n",
       "      <th>c_100</th>\n",
       "      <th>c_other</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 101 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   c_1  c_2  c_3  c_4  c_5  c_6  c_7  c_8  c_9  c_10   ...     c_92  c_93  \\\n",
       "0    0    1    1    1    1    1    0    0    0     1   ...        0     0   \n",
       "1    0    0    0    0    0    0    0    0    1     0   ...        0     0   \n",
       "2    2    0    2    0    0    0    1    0    2     0   ...        0     0   \n",
       "3    0    0    0    0    0    0    0    0    0     0   ...        0     0   \n",
       "4    0    0    1    0    1    0    0    0    0     0   ...        0     0   \n",
       "\n",
       "   c_94  c_95  c_96  c_97  c_98  c_99  c_100  c_other  \n",
       "0     0     0     0     1     0     0      0       30  \n",
       "1     0     0     0     0     0     0      0       14  \n",
       "2     0     0     0     0     0     0      2       17  \n",
       "3     0     0     0     0     0     0      0        8  \n",
       "4     0     0     0     0     0     0      0        8  \n",
       "\n",
       "[5 rows x 101 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dels = data.columns[:10]\n",
    "data = data.drop(dels,axis=1)\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "这里有101维特征，但具体是什么也没有说明，0值特别多，没法做可视化，于是先做个降维试试"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "#pca = PCA(n_components=0.5)\n",
    "#data = pca.fit_transform(data)\n",
    "#data.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "1维？？！感觉上是不对劲的，可能只是对这些特征做了某些加权和，但如果就这么去聚类的话不太合适。所以还是先使用原始数据。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "#使用K均值算法进行聚类，先写一个函数，以便循环调用，找到最佳的K\n",
    "def K_cluster(K,data):\n",
    "    start = time.time()\n",
    "    \n",
    "    print(\"当K的值为: {}时：\".format(K));\n",
    "    \n",
    "    mb_kmeans = MiniBatchKMeans(n_clusters = K)\n",
    "    mb_kmeans.fit(data)\n",
    "    data_pred = mb_kmeans.predict(data)\n",
    "    CH_score = metrics.silhouette_score(data,data_pred)\n",
    "\n",
    "    print(\"CH_score结果为: {}\".format(CH_score))\n",
    "    \n",
    "    return CH_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "当K的值为: 10时：\n",
      "CH_score结果为: 0.44351885585965267\n",
      "当K的值为: 20时：\n",
      "CH_score结果为: 0.20861574368998728\n",
      "当K的值为: 30时：\n",
      "CH_score结果为: 0.18339383090296854\n",
      "当K的值为: 40时：\n",
      "CH_score结果为: 0.15284798041557038\n",
      "当K的值为: 50时：\n",
      "CH_score结果为: 0.14908462647096446\n",
      "当K的值为: 60时：\n",
      "CH_score结果为: 0.1078604954896747\n",
      "当K的值为: 70时：\n",
      "CH_score结果为: 0.08879750663755004\n",
      "当K的值为: 80时：\n",
      "CH_score结果为: 0.044231977614041636\n",
      "当K的值为: 90时：\n",
      "CH_score结果为: 0.07958372652640208\n",
      "当K的值为: 100时：\n",
      "CH_score结果为: 0.08400477338921163\n"
     ]
    }
   ],
   "source": [
    "Ks = [10,20,30,40,50,60,70,80,90,100]\n",
    "ch_scores = []\n",
    "for i in Ks:\n",
    "    score = K_cluster(i,data)\n",
    "    ch_scores.append(score)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x201e235eb38>]"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3XucVWW9x/HPj+Gi4iWQMZSBBhTRURN0h5TiJQSGmQJLO+IlqexFniQtPRWFnQqPZealLE055lErJTQv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+D6MIU8z2B8YDf8hLBe6uWx5vwF3AcGAxsHe0bm9gcdK1tdH7L4u+uJ8H7gGMcLFJx+jxzwI1SdfZRp/F7sALROfOstan9bvRC1gBdCdM1XoPMDJt3w+gHHg+1/cBuBY4pbntWnPTkX4emVk5MAh4Cviku68GiO73Sq6yNvUb4AfA5mh5T+Atd98YLdcT/vGnQT+gAfi/qLnrOjPrSkq/G+6+ErgUeBlYDbwN1JHe70ejrX0fGn8kG+Xls1Ho54mZ7Qr8Dfiuu7+TdD1JMLMvAK+5e1326mY2TUuXsY7AYcAf3H0Q8B4pacppTtRWPQboC+wDdCU0YTSVlu9HLjvk345CPw/MrBMh8P/i7rdHq181s72jx/cGXkuqvjZ0JDDazF4EphKaeH4DfMLMOkbblAGrkimvzdUD9e7+VLR8G+FHII3fDYDjgRfcvcHdNwC3A58jvd+PRlv7PtQDvbO2y8tno9BvJTMz4I/AIne/POuh6cC46O9xhLb+oubuP3L3MncvJ5yge8jdTwNmASdFm6XiswBw91eAFWY2IFo1DFhICr8bkZeBIWa2S/TvpvHzSOX3I8vWvg/TgTOiXjxDgLcbm4FaQxdntZKZHQX8A3iOj9qxf0xo158G9CF82b/i7msSKTIBZnYs8F/u/gUz60c48u8OzAVOd/d1SdbXVsxsIHAd0BlYDnydcLCVyu+Gmf0cOJnQ620u8E1CO3Uqvh9mdgtwLGE0zVeBnwJ30sz3Ifph/D2ht8/7wNfdvbbVNSj0RUTSQ807IiIpotAXEUkRhb6ISIoo9EVEUkShLyKSIgp9EZEUUeiLiKSIQl9EJEX+HzSPT4Gnjm7QAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x201e2609e48>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks, np.array(ch_scores), 'b-')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "总体效果并不好，尤其是当类别多的时候尤其明显，所以再尝试一下pca后的结果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(13418, 1)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pca = PCA(n_components=0.5)\n",
    "data = pca.fit_transform(data)\n",
    "data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "当K的值为: 10时：\n",
      "CH_score结果为: 0.5692376930435814\n",
      "当K的值为: 20时：\n",
      "CH_score结果为: 0.5273573008286377\n",
      "当K的值为: 30时：\n",
      "CH_score结果为: 0.527560258268079\n",
      "当K的值为: 40时：\n",
      "CH_score结果为: 0.5222323747567976\n",
      "当K的值为: 50时：\n",
      "CH_score结果为: 0.5356508918480741\n",
      "当K的值为: 60时：\n",
      "CH_score结果为: 0.5384630396848407\n",
      "当K的值为: 70时：\n",
      "CH_score结果为: 0.5440145615231674\n",
      "当K的值为: 80时：\n",
      "CH_score结果为: 0.5764547683758302\n",
      "当K的值为: 90时：\n",
      "CH_score结果为: 0.5719018626769491\n",
      "当K的值为: 100时：\n",
      "CH_score结果为: 0.616027011409894\n"
     ]
    }
   ],
   "source": [
    "Ks = [10,20,30,40,50,60,70,80,90,100]\n",
    "ch_scores = []\n",
    "for i in Ks:\n",
    "    score = K_cluster(i,data)\n",
    "    ch_scores.append(score)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x201808f4f60>]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpY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vuC1IX17NqqZwyVg4cAfzJ3b8CfEqJDOXUJzFWPRjoDnQCvkAYwogqlfdHQ7Lyt6PQzwAza0kI/L+4+4zE4veSLacTX9fGVV8OfQMYZGZvEabV7EvY829jZsmOrtvNx1DEaoAad385cX86YSNQiu8NgJOAN93TNQ84AAABLElEQVS91t03ATOAr1O674+kHb0fGpzLpCkU+s1kZgbcBSxz99+lfGsmMDzx7+GEsf6i5u7XuXtnd+9GOED3N3c/D5gHnJlYrSReCwB3/xew2sy+lFh0IrCUEnxvJLwNHGVmuyf+bpKvR0m+P1Ls6P0wExiWOIvnKOCj5DBQc+jirGYys28CzwKvUTeO/RPCuP5UoCvhzX6Wu38QS5ExMLPjgavd/RQz60HY828LvAp81+tmWitqZnY4cCdhfuhVwAWEna2SfG+Y2S+Acwhnvb0KXEQYpy6J94eZTQKOJ3TTfA/4H+BB6nk/JDaMtxPO9vmMMN1ss/vOK/RFREqIhndEREqIQl9EpIQo9EVESohCX0SkhCj0RURKiEJfRKSEKPRFREqIQl9EpIT8fxQvPbOGQnNCAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x201808a1ba8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks, np.array(ch_scores), 'b-')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "显然效果好了很多；当k=100时结果最优"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
